package ${package.Controller};


import ${package.Service}.${table.serviceName};
import org.springframework.web.bind.annotation.RequestMapping;

<#if restControllerStyle>
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PostMapping;
<#else>
import org.springframework.stereotype.Controller;
</#if>
<#if superControllerClassPackage??>
import ${superControllerClassPackage};
</#if>
<#if entityLombokModel>
import lombok.extern.slf4j.Slf4j;
import lombok.RequiredArgsConstructor;
</#if>
<#if swagger>
import io.swagger.annotations.Api;
</#if>



/**
 * ${table.comment!}: 接口控制层
 *
 * @author ${author}
 * @since ${date}
 */
<#if entityLombokModel>
@Slf4j
</#if>
<#if restControllerStyle>
@RestController
<#else>
@Controller
</#if>
<#if swagger>
@Api(tags = "${table.comment!}接口管理")
</#if>
@RequiredArgsConstructor
@RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
<#if kotlin>
class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
<#else>
<#if superControllerClass??>
public class ${table.controllerName} extends ${superControllerClass} {
<#else>
public class ${table.controllerName} {
    private final ${table.serviceName} service;

    @ApiOperation(value = "${entity}列表接口")
    @PostMapping("/list")
    public Object list() {
        log.info("进入了${entity}列表接口");
        return service.list();
    }

</#if>

}
</#if>
